const ExecutorClient = require('../ExecutorClient')

class ProcessExecutorClient extends ExecutorClient {
    onInit() {
        process.title = 'NODE 后台任务执行器'
        process.on('message', (...args) => this.on(...args))
    }

    async onSend(msg) {
        process.send(msg)
    }
}

module.exports = ProcessExecutorClient
